package ntd.util.frame.storage.bo;

import lombok.Data;
import lombok.experimental.Accessors;
import ntd.util.modular.function.entity.ChannelBusiness;

@Data
@Accessors(chain = true)
public class StorageConfig {
    private String url;
    private String appKey;
    private String appSecret;

    public static StorageConfig transform(ChannelBusiness channelBusiness) {
        StorageConfig storageConfig = new StorageConfig();

        storageConfig.setUrl(channelBusiness.getEndpoint());
        storageConfig.setAppKey(channelBusiness.getAppKey());
        storageConfig.setAppSecret(channelBusiness.getAppSecret());

        return storageConfig;
    }
}